package com.bdilab.iot.dto.roleDto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @author WangNing
 * @version 1.0
 * @date 2020/8/1 20:22
 */
@Data
@ApiModel
public class CreateRoleDto {

    @NotBlank(message = "角色名不能为空")
    @ApiModelProperty(value = "角色名", required = true)
    private String roleName;


    @ApiModelProperty(value = "角色描述", required = false)
    private String description;

    @ApiModelProperty(value = "绑定的权限", required = true)
    @NotEmpty(message = "角色必须指定至少一个权限")
    private List<Long> permissions;

}
